home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / nrpas13.zip / F1DIM.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-29  |  365b  |  18 lines

  1. FUNCTION f1dim(x: real): real;
  2. (* Programs using F1DIM must declare the variables
  3. TYPE
  4.    glndim = ARRAY [1..ndim] OF real;
  5. VAR
  6.    ncom: integer;
  7.    pcom,xicom: glndim;
  8. and assign values to them externally. *)
  9. VAR
  10.    j: integer;
  11.    xt: glndim;
  12. BEGIN
  13.    FOR j := 1 TO ncom DO BEGIN
  14.       xt[j] := pcom[j]+x*xicom[j]
  15.    END;
  16.    f1dim := fnc(xt)
  17. END;
  18.